home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / dmedia / dmG728Encode.z / dmG728Encode
Encoding:
Text File  |  1998-10-20  |  4.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm))))                                            ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      dmG728Encode - implements the ITU (International Telecommunication Union)
  10.      Recommendation G.728 compression (LD-CELP).
  11.  
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ddddmmmm____aaaauuuuddddiiiioooouuuuttttiiiillll....hhhh>>>>
  15.  
  16.      DDDDMMMMssssttttaaaattttuuuussss ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((DDDDMMMMGGGG777722228888eeeennnnccccooooddddeeeerrrr hhhhaaaannnnddddlllleeee,,,,
  17.                        sssshhhhoooorrrrtttt ****iiiibbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd cccchhhhaaaarrrr ****oooobbbbuuuuffff,,,, iiiinnnntttt nnnnssssaaaammmmpppplllleeeessss))))
  18.  
  19.  
  20. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  21.      _h_a_n_d_l_e    DDDDMMMMGGGG777722228888eeeennnnccccooooddddeeeerrrr structure, created by ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeeerrrrCCCCrrrreeeeaaaatttteeee((((3333ddddmmmm)))),
  22.                specifies the signal processing parameters.
  23.  
  24.  
  25.      _i_b_u_f      pointer to input sample data buffer. The data format is short
  26.                (16-bit).  The samples are assumed to be two's complement.  The
  27.                sampling rate must be 8 kHz.
  28.  
  29.  
  30.      _o_b_u_f      pointer to output data buffer.  The data format is unsigned
  31.                char (8-bit).  This bitstrem buffer must consist of a multiple
  32.                of 10 bytes.
  33.  
  34.  
  35.      _n_s_a_m_p_l_e_s  number of samples in the input buffer to be processed. the
  36.                value of nsamples passed to the G.728 encode/decode routines
  37.                must always be a multiple of 40.
  38.  
  39.  
  40. RRRREEEETTTTUUUURRRRNNNNEEEEDDDD VVVVAAAALLLLUUUUEEEE
  41.      Returns DDDDMMMM____FFFFAAAAIIIILLLLUUUURRRREEEE or DDDDMMMM____SSSSUUUUCCCCCCCCEEEESSSSSSSS.
  42.  
  43.  
  44.  
  45. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  46.      ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) implements the ITU Recommendation G.728 compression.
  47.      The uncompressed data sampling rate is 8000 Hz.  And the compressed
  48.      bitrate is 16000 bits/s.
  49.  
  50.  
  51.      ITU Recommendation G.728 compression also uses a linear prediction
  52.      scheme.  This means that the compressed bits, which carrying compressed
  53.      information, are interrelated or interdependent.  If a application calls
  54.      aaaaffffSSSSeeeeeeeekkkkFFFFrrrraaaammmmeeee((((3333ddddmmmm)))) to an offset into the compressed bit stream file and
  55.      then starts reading bits in the middle of the bit stream and decompress
  56.      them with ddddmmmmGGGG777722228888DDDDeeeeccccooooddddeeee((((3333ddddmmmm)))), the interdependency of the bits at the
  57.      cutting point is lost.  The application will initially get back data with
  58.      a lower amplitude than if he had read the same data back during a
  59.      complete pass over the file from the beginning.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm))))                                            ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      There is no way to exactly recreate the decoded data in the middle of the
  75.      bit stream file without going all the way back to the beginning.
  76.      However, with a "preroll" value to read ahead a portion of the compressed
  77.      file, application can compensate for the amplitude problem.  We recommend
  78.      2 second "preroll".
  79.  
  80.  
  81. NNNNOOOOTTTTEEEE
  82.      G.728 algorithm was developed for sampling rate of 8 kHz.
  83.  
  84.  
  85. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  86.      dmG728EncoderCreate(3dm), dmG728EncoderDestroy(3dm), dmG728Decode(3dm),
  87.      ITU Recommendation G.728.
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.